package com.cungmua.app.base;

import android.app.AlertDialog;
import android.content.DialogInterface;

import com.cungmua.app.R;
import com.cungmua.app.handler.BaseRequestHandler;

/**
 * Created by kelvin.nguyen on 6/16/14.
 */
public abstract class BaseRequestActivity extends BaseActivity implements BaseRequestHandler{


    @Override
    public void onNetworkError(Exception e) {
        AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
        dialogBuilder.setMessage(R.string.network_error)
                .setNeutralButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                }).setCancelable(true);
        dialogBuilder.show();
    }
}
